// import './assets/main.css'
import axios from "@/plugin/axios";
import { createApp } from "vue";
import qs from "qs";
import { createPinia } from "pinia";
// pinia数据持久化
import piniaPluginPersist from "pinia-plugin-persist";

import "./assets/global.css";
// import 'element-plus/dist/index.css'
// import "element-plus/theme-chalk/el-loading.css";
// import "element-plus/theme-chalk/el-message.css";
// import "element-plus/theme-chalk/el-container.css";
// import "element-plus/theme-chalk/el-notification.css";
// element 全局导入
// import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
// 导入阿里图标
import "./assets/fonts/iconfont.css";
// 导入 element图标
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

// 全局过滤
import * as filters from "./utils/filter";

import App from "./App.vue";
import router from "./router";

const app = createApp(App);
// ele 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component);
}
//挂载全局过滤器
app.config.globalProperties.$filters = filters;
// 挂载全局JSON格式化插件
app.config.globalProperties.$qs = qs;
const pinia = createPinia();
// pinia使用持久化插件
pinia.use(piniaPluginPersist);
app.use(pinia);
app.use(router);
// app.use(ElementPlus);
app.use(axios);

app.mount("#app");
